function convertHTML(str) {
    // &colon;&rpar;
    const symoblList = [
        { reg: /&/g, value: "&amp;" },
        { reg: /</g, value: "&lt;" },
        { reg: />/g, value: "&gt;" },
        { reg: /"/g, value: "&quot;" },
        { reg: /'/g, value: "&apos;" }
    ];
    symoblList.forEach(item => (str = str.replace(item.reg, item.value)));

    return str;
}

convertHTML("Dolce & Gabbana");
